/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ui;

import java.awt.Component;
import javax.swing.AbstractCellEditor;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Esteban
 */
public class CeldaGrupoCompartido extends AbstractCellEditor implements TableCellEditor, TableCellRenderer{
  PanelGrupoCompartido panel;
 
  public CeldaGrupoCompartido() {
    panel = new PanelGrupoCompartido();
  }
  
 
  public Component getTableCellEditorComponent(JTable table, Object value,
      boolean isSelected, int row, int column) {
      InfoGrupoCompartido grupo = (InfoGrupoCompartido)value;
      panel.updateData(grupo, table);
      return panel;
  }
 
  public Object getCellEditorValue() {
    return null;
  }
 
  public Component getTableCellRendererComponent(JTable table, Object value,
      boolean isSelected, boolean hasFocus, int row, int column) {
      InfoGrupoCompartido grupo = (InfoGrupoCompartido)value;
      panel.updateData(grupo, table);
      return panel;
  }
}
